tests: Move test gpg keyring into writable tmpdir
authorColin Walters <walters@verbum.org>
Mon, 23 Feb 2015 18:02:37 +0000 (13:02 -0500)
committerColin Walters <walters@verbum.org>
Mon, 23 Feb 2015 20:21:23 +0000 (15:21 -0500)
At least the version of gpgme in RHEL7 wants to create a lock file,
work around this by copying it into the writable test temporary
directory.

tests/libtest.sh

index 5abbedf24b931d3347b362fa36decd2599c6fd6a..905c8cb8a413b7011f74e92a179535dc3d6ba5e1 100644 (file)
@@ -23,8 +23,13 @@ test_tmpdir=$(pwd)
 export G_DEBUG=fatal-warnings
 
 export TEST_GPG_KEYID="472CDAFA"
-export TEST_GPG_KEYHOME=${SRCDIR}/gpghome
-export OSTREE_GPG_HOME=${TEST_GPG_KEYHOME}/trusted
+
+# GPG when creating signatures demands a writable
+# homedir in order to create lockfiles.  Work around
+# this by copying locally.
+cp -a ${SRCDIR}/gpghome ${test_tmpdir}
+export TEST_GPG_KEYHOME=${test_tmpdir}/gpghome
+export OSTREE_GPG_HOME=${test_tmpdir}/gpghome/trusted
 
 if test -n "${OT_TESTS_DEBUG}"; then
     set -x